Skip to content

feat: implement issue #320 — Compliance: check-suite-prefs-unreadable - #327

Merged
don-petry merged 10 commits into
mainfrom
dev-lead/issue-320-20260619-1539
Jun 19, 2026
Merged

don-petry merged 10 commits into
mainfrom
dev-lead/issue-320-20260619-1539

Conversation

@don-petry

Copy link
Copy Markdown
Contributor

Closes #320

Implemented by dev-lead agent. Please review.

@don-petry
don-petry requested a review from a team as a code owner June 19, 2026 15:42
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jun 19, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@don-petry, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 8 minutes and 52 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f5c4032e-76a5-43e5-9dbd-be2564abddbf

📥 Commits

Reviewing files that changed from the base of the PR and between 3086b31 and 7e4567e.

📒 Files selected for processing (2)
  • scripts/apply-repo-settings.sh
  • tests/integration/apply-repo-settings.bats
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev-lead/issue-320-20260619-1539

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request corrects the GitHub REST API endpoint for check-suite preferences from singular to plural (check-suites/preferences) in scripts/apply-repo-settings.sh and introduces integration tests in tests/integration/apply-repo-settings.bats. The review feedback correctly identifies that although the test header claims to stub both gh and jq, only gh is actually mocked. To ensure the integration tests are fully hermetic and do not fail in environments lacking jq, a mock for jq should be added as suggested.

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) June 19, 2026 15:53
@don-petry
don-petry disabled auto-merge June 19, 2026 15:59
@don-petry
don-petry enabled auto-merge (squash) June 19, 2026 16:01
@don-petry
don-petry disabled auto-merge June 19, 2026 16:22
@don-petry
don-petry enabled auto-merge (squash) June 19, 2026 16:24
@don-petry
don-petry disabled auto-merge June 19, 2026 16:39
@don-petry
don-petry enabled auto-merge (squash) June 19, 2026 16:41
@don-petry
don-petry disabled auto-merge June 19, 2026 16:55
@don-petry
don-petry enabled auto-merge (squash) June 19, 2026 16:57
@don-petry
don-petry disabled auto-merge June 19, 2026 17:03
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
All checks passing (22 completed, 2 skipped, 0 failed)
**Reviews:**
- don-petry: COMMENTED (no changes requested)
- gemini-code-assist[bot]: COMMENTED (informational, no changes requested)
**Tier 1 Blockers:**
None present. No failed checks, no CHANGES_REQUESTED states.
---
## Conclusion
**No changes needed.**
The SonarCloud bot found zero actionable issues. All CI quality gates passed, and no reviewer has requested changes. The PR is ready.

@don-petry
don-petry enabled auto-merge (squash) June 19, 2026 17:03
@don-petry
don-petry disabled auto-merge June 19, 2026 19:24
@don-petry
don-petry enabled auto-merge (squash) June 19, 2026 19:26
@don-petry
don-petry disabled auto-merge June 19, 2026 19:33
@don-petry
don-petry enabled auto-merge (squash) June 19, 2026 19:35
@don-petry
don-petry disabled auto-merge June 19, 2026 19:36
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
## Summary
**Bot:** sonarcloud[bot]
**Issues addressed:** 0
- **SonarCloud Quality Gate:** Passed with no new issues, no security hotspots, and no code quality violations detected
- **Code Review Feedback (gemini-code-assist):** The suggested `jq` mock was already implemented in the test file — resolved both threads with confirmation
**Files reviewed:**
- `scripts/apply-repo-settings.sh` — Corrected GitHub REST API endpoint from `check-suite/preferences` to `check-suites/preferences` (plural)
- `tests/integration/apply-repo-settings.bats` — Integration tests with both `gh` and `jq` mocks already in place
**Skipped (informational):** 0
**Result:** No actionable issues found. SonarCloud quality gate passed with zero new issues. All CI checks pass. Both gemini-code-assist review threads have been resolved with confirmation that the suggested improvements are already implemented.

@don-petry
don-petry enabled auto-merge (squash) June 19, 2026 19:37
@don-petry
don-petry disabled auto-merge June 19, 2026 19:40
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) June 19, 2026 19:41
@don-petry
don-petry disabled auto-merge June 19, 2026 19:49
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) June 19, 2026 19:51
@don-petry
don-petry disabled auto-merge June 19, 2026 19:55
@sonarqubecloud

Copy link
Copy Markdown

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) June 19, 2026 19:56

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review — APPROVED ✓

Risk: LOW
Reviewed commit: 7e4567e700c4f841fb477eef085173bbbc0eb13c
Review mode: triage-approved (single reviewer)

Summary

Corrects the GitHub REST API endpoint for check-suite preferences from the non-existent singular path (check-suite/preferences) to the correct plural path (check-suites/preferences) in scripts/apply-repo-settings.sh, and adds hermetic bats integration tests that stub gh and jq to assert the plural endpoint is used and dry-run issues no PATCH. Diff is +64/-2 across 2 files.

Linked issue analysis

Closes #320 (Compliance: check-suite-prefs-unreadable). The compliance audit could not evaluate check-suite preferences; its remediation is to run scripts/apply-repo-settings.sh. That script targeted a wrong (singular) endpoint, so the remediation could not succeed. This PR fixes the endpoint so the remediation works and adds regression tests guarding the correct path. Substantively addressed.

Findings

No issues. The endpoint correction matches GitHub's documented PATCH /repos/{owner}/{repo}/check-suites/preferences. Tests are well-structured (positive, negative, and dry-run cases) and hermetic. gemini-code-assist's informational note about a missing jq mock is already resolved — a jq mock is present in the test setup. No CHANGES_REQUESTED reviews and no unresolved threads. MCP secret-scan tool was not permitted in this environment (noted, not failed); the gitleaks CI check passed.

CI status

All checks green. Successes include CI (TypeScript, Go, Secret scan/gitleaks), CodeQL (actions/go/javascript-typescript), SonarCloud (Quality Gate passed, 0 new issues), AgentShield, and dependency-audit. Remaining checks are SKIPPED (e.g. dependabot-automerge, image push). No failures.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@don-petry
don-petry merged commit f35e3a8 into main Jun 19, 2026
22 checks passed
@don-petry
don-petry deleted the dev-lead/issue-320-20260619-1539 branch June 19, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compliance: check-suite-prefs-unreadable

2 participants